package ca.ualberta.cs.PrivacyManagement;

import java.sql.SQLException;
import java.sql.Statement;

import ca.ualberta.cs.CLRDB.interfaces.EntityRelManagement;

public class Settings extends EntityRelManagement{

	@Override
	public void initialize(Statement statement) throws SQLException {
		
		//person settings
		statement.executeUpdate("ALTER TABLE PERSON "
                + "ADD COLUMN " + "SHOWNAME CHAR(1) WITH DEFAULT 'n' " 
                + "ADD COLUMN " + "SHOWUSERNAME CHAR(1) WITH DEFAULT 'y' " 
                + "ADD COLUMN " + "SHOWAFFILIATION CHAR(1) WITH DEFAULT 'n' "
                + "ADD COLUMN " + "SHOWJOINDATE CHAR(1) WITH DEFAULT 'n' " 
                + "ADD COLUMN " + "SHOWDESCRIPTION CHAR(1) WITH DEFAULT 'n' "
                + "ADD COLUMN " + "SHOWFRIENDLIST CHAR(1) WITH DEFAULT 'n' " 
                + "ADD COLUMN " + "SHOWPAPER CHAR(1) WITH DEFAULT 'n' "
                + "ADD COLUMN " + "SHOWEMAIL CHAR(1) WITH DEFAULT 'n' "
                + "ADD COLUMN " + "SHOWPUBLICATION CHAR(1) WITH DEFAULT 'y' ");
		
	}
	
	public void setupDefaultConferenceSettings(){
		//default settings seem fine for now!
		//if not: write a trigger to update them when new user comes
		//if there should be difference between settings of author and reviewer:
		//   trigger should become active somehow when the person changes role???
		//   in this case may be a procedure call is better than trigger -> or, can procedure activate trigger?
	}

	public void setRole(String role) {
		// TODO Auto-generated method stub
		
	}

	public void resetRole() {
		// TODO Auto-generated method stub
		
	}
	

}
